<?php
    
    add_theme_support('nav-menus');
    
    if(function_exists('register_nav_menus'))
    {
        
        register_nav_menus(array('main_menu'=>'main nav'));
    }
    
function add_markup_pages($output) {
    $output= preg_replace('/page-item/', ' first-page-item page-item', $output, 1);
    $output=substr_replace($output, " last-page-item page-item", strripos($output, "page-item"), strlen("page-item"));
    return $output;
}
add_filter('wp_list_pages', 'add_markup_pages');


function custom_excerpt_length( $length ) 
   {
        return 46;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length');
    
    
function new_excerpt_more($more)
{
    
   global $post;
   return '...<a href="'. get_permalink($post->ID) . '">' . 'Read more' . '</a>';
    
}  

add_filter('excerpt_more', 'new_excerpt_more');  
?>